﻿#ifndef MANSIGNALS_H
#define MANSIGNALS_H

#include "src/middle/structs/cloudmodels.h"
#include <QObject>

/// @brief 管理操作对象存储产生的信号
///
class ManSignals: public QObject
{
    Q_OBJECT
public:
    explicit ManSignals(QObject *parent = nullptr);
    ~ManSignals();

signals:
    void error(int api, const QString &msg, const QJsonValue &req);
    void loginSuccess();
    void unLogin();
    void bucketsSuccess(const QList<MyBucket> &buckets);
    void objectsSuccess(const QList<MyObject> &objects);
    void startDownload(
            const QString &jobId,
            const QString &key,
            const QString &localPath,
            qulonglong total);
    void downloadProcess(
            const QString &jobId,
            qulonglong transferred,
            qulonglong total);
    void downloadSuccess(const QString &jobId);
    void startUpload(
            const QString &jobId,
            const QString &key,
            const QString &localPath);
    void uploadProcess(
            const QString &jobId,
            qulonglong transferred,
            qulonglong total);
    void uploadSuccess(const QString &jobId);
};

#endif // MANSIGNALS_H
